package com.cskaoyan.service.system;


import com.cskaoyan.bean.MallAdmin;
import com.cskaoyan.bean.MallRole;
import com.cskaoyan.model.bo.PageBo;
import com.cskaoyan.model.bo.profile.PasswordBo;
import com.cskaoyan.model.vo.PageListVo;
import com.cskaoyan.model.vo.system.SimpleMallAdmin;

/**
 * @program: project-market
 * @description: 管理员的增删改查
 * @author: Weiwei Liu
 * @create: 2021-11-29 21:04
 **/

public interface AdminService {

    /**
     * 查询所有管理员
     * @param pageBo
     * @param username
     * @return
     */
    PageListVo list(PageBo pageBo, String username);

    /**
     * 更新所选管理员账号
     * @param mallAdmin
     * @return
     */
    boolean update(MallAdmin mallAdmin);

    /**
     * 删除所选管理员账号
     * @param mallAdmin
     * @return
     */
    boolean delete(MallAdmin mallAdmin);

    /**
     * 新增管理员账号
     * @param simpleMallAdmin
     * @return
     */
    MallAdmin create(SimpleMallAdmin simpleMallAdmin);

    Integer selectAdmin(String username, String password);

    Integer password(PasswordBo bo, String username);

    boolean selectRoleExistAdmin(MallRole role);
}
